-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket timeout tidyup #3704
Socket timeout tidyup #3704
Conversation
All stop timer does is to set a variable. It is a simply setter function. It is confusing to call it stop_timer because it implies that it does something more than just set a timestamp.
We do not need it.
To make it obvious it is setter function and to make it consistent with other setter functions.
A deadline makes people imagine a fixed point in time, a timestamp. However, socket::next_deadline is a timeout value and not a deadline. It signifies the seconds of inactivity that would cause a socket timeout. Renames: set_next_deadline -> set_default_timeout set_next_deadline(timeout) -> set_timeout(timeout) io_timeout -> default_timeout timeout_set -> set_default_timeout_value next_deadline -> timeout
It seems there is no major change other than tidying it up. They seem to be ok and the comments will be very helpful. @dsiganos, if you want to remove one more thing I could point the function |
Tidy up of how timeouts are handled in socket class.
A deadline makes people imagine a fixed point in time, a timestamp.
However, socket::next_deadline is a timeout value and not a deadline.
It signifies the seconds of inactivity that would cause a socket timeout.
All stop timer does is to set a variable. It is a simply setter function.
It is confusing to call it stop_timer because it implies that it does
something more than just set a timestamp.